﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using ScrumTable.BL.DM.DataManagement.Logging;
using ScrumTable.BL.DM.DataManagement.Tracking;
using ScrumTable.BL.DM.DataManagement.Tracking.EditCommands;
using ScrumTable.BL.DM.Properties;
using ScrumTable.Common;
using ScrumTable.Common.Collections;
using ScrumTable.Common.EventHandling;
using ScrumTable.Common.Threading;
using ScrumTable.DL.Data.Common;

#endregion

namespace ScrumTable.BL.DM.DataManagement
{
    /// <summary>
    /// This class specifies the concrete implementation for all domain data
    /// collections.
    /// </summary>
    public class ScrumItemTypeCollection : DomainCollection<ScrumItemType>
    {
        #region Declarations
        //--------------------------------------------------------------------
        // Declarations
        //--------------------------------------------------------------------

        #endregion

        #region Properties
        //--------------------------------------------------------------------
        // Properties
        //--------------------------------------------------------------------

        /// <summary>
        /// Gets the underlying workflow for task management.
        /// </summary>
        public ScrumItemType TaskType
        {
            get { return TryGetByName(ContextInternal.Schema.TaskSchema.SchemaMappedName); }
        }

        /// <summary>
        /// Gets the underlying workflow for bug state management.
        /// </summary>
        public ScrumItemType BugType
        {
            get { return TryGetByName(ContextInternal.Schema.BugSchema.SchemaMappedName); }
        }

        /// <summary>
        /// Gets the underlying workflow for user story state management.
        /// </summary>
        public ScrumItemType UserStoryType
        {
            get { return TryGetByName(ContextInternal.Schema.UserStorySchema.SchemaMappedName); }
        }

        #endregion

        #region Constructors / Destructor
        //--------------------------------------------------------------------
        // Constructors / Destructor
        //--------------------------------------------------------------------

        /// <summary>
        /// Creates a new ScrumItemTypeCollection instance. This constructor
        /// is internal because its needed by the current assembly only.
        /// </summary>
        /// <param name="context">Domain context which provides information about the object hierarchy.</param>
        /// <param name="parent">Parent which provides information about the object hierarchy.</param>
        /// <param name="data">Contains the underlying data access component.</param>
        internal protected ScrumItemTypeCollection(
            IDomainContext context,
            Project parent,
            IDataAccessObject data)
            : base(true, context, parent, data)
        {
        }

        #endregion

        #region Methods
        //--------------------------------------------------------------------
        // Methods
        //--------------------------------------------------------------------

        #endregion
    }
}